import { createRouter, createWebHistory, createMemoryHistory } from 'vue-router'
import Page1 from '@/views/Page1.vue'

console.log(createMemoryHistory);
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  // mode: 'abstract'
  routes: [
    {
      path: '/',
      component: Page1
    },
    {
      path: '/page1',
      name: 'page1',
      component: () => import('../views/Page1.vue')
    },
    {
      path: '/page2',
      name: 'page2',
      component: () => import('../views/Page2.vue'),
      children: []
    },
    {
      path: '/page3',
      name: 'page3',
      component: () => import('../views/Page3.vue')
    },
  ]
})

export default router
